package com.chb.controller;

import com.chb.annotation.LogAnnotation;
import com.chb.model.vo.Result;
import com.chb.model.vo.TimeVo;
import com.chb.service.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * @author: 陈海彬
 * @date: Created in 2023/10/9 10:12
 * @description: 统计信息
 * @modified By:
 * @version: 1.0
 */
@RestController
public class StatisticsController {
    @Autowired
    private StatisticsService statisticsService;


    /**
     * @param timeVo 时间vo类
     * @return com.chb.model.vo.Result
     * @create by: 陈海彬
     * @description: 获取统计信息所需的数据
     * @create time: 2023/10/9 15:06
     */
    @PostMapping("/statistics/getStatisticsInfo")
    @LogAnnotation(business_type = "统计信息时间模糊查询")
    public Result getStatisticsInfo(@RequestBody TimeVo timeVo) {
        return statisticsService.getStatisticsInfo(timeVo.getBegin(), timeVo.getEnd());
    }
}